Why Nominal-Typing Matters in Mainstream OOP
نویسنده
چکیده
The statements ‘inheritance is not subtyping’ and ‘mainstream OO languages unnecessarily place restrictions over inheritance’ have rippled as mantras through the PL research community for years. Many mainstream OO developers and OO language designers, however, do not accept these statements. In nominally-typed OO languages that these developers and language designers are dearly familiar with, inheritance simply is subtyping; and they believe OO type inheritance is an inherently nominal notion, not a structural one. Nominally-typed OO languages, such as Java, C#, C++, and Scala, are among the most used programming languages today. However, the value of nominal typing to mainstream OO developers, as a means for designing robust OO software, seems to be in wait for full appreciation among PL researchers—thereby perpetuating an unnecessary schism between many OO developers and language designers and many OO PL researchers, with each side discounting, if not even disregarding, the views of the other. In this essay we strengthen and complement earlier efforts to demonstrate the semantic value of nominal typing by presenting a technical comparison between nominal OO type systems and structural OO type systems. Recently, a domain-theoretic model of nominally-typed OOP was compared to well-known models of structurally-typed OOP. Combined, these comparisons provide both a clear technical account and a deep mathematical account of the relation between nominal and structural OO type systems that have not been presented before, and they help demonstrate the key value of nominal typing and nominal subtyping to OO developers and language designers. We believe a clearer understanding of the key semantic advantage of pure nominal OO typing over pure structural OO typing can help remedy the existing schism. We believe future foundational OO PL research, to further its relevance to mainstream OOP, should be based less on structural models of OOP and more on nominal ones instead.
منابع مشابه
An Overview of Nominal-Typing versus Structural-Typing in Object-Oriented Programming
NOOP [4, 6, 7, 8] is a mathematical model of nominally-typed OOP that proves the identification of inheritance and subtyping in mainstream nominally-typed OO programming languages and the validity of this identification [11]. This report gives an overview of the main notions in OOP relevant to constructing a mathematical model of OOP such as NOOP. The emphasis in this report is on defining nomi...
متن کاملNOOP: A Domain-Theoretic Model of Nominally-Typed OOP
The majority of industrial-strength object-oriented (OO) software is written using nominally-typed OO programming languages. Extant domain-theoretic models of OOP developed to analyze OO type systems miss, however, a crucial feature of these mainstream OO languages: nominality. This paper presents the construction of NOOP as the first domain-theoretic model of OOP that includes full class/type ...
متن کاملOn Understanding Generics
One important value behind developing and presenting NOOP [2, 3, 4, 12, 6, 5, 7, 9, 8], is to provide a more precise foundation on which further OOP research can be built. NOOP provides a capacity for better mathematical reasoning about mainstream OO languages. The development of NOOP was mainly motivated by the lack of a precise model of OOP despite the prominence and domination of OOP among m...
متن کاملA Comparison of NOOP to Structural Domain-Theoretic Models of Object-Oriented Programming
Mainstream object-oriented programming (OOP) languages such as Java, C#, C++ and Scala are all almost entirely nominally-typed. NOOP is a recently developed domain-theoretic model of OOP that was designed to fully include nominal information found in nominally-typed OOP. This paper compares NOOP to the most widely known domain-theoretic models of OOP, namely, the models developed by Cardelli an...
متن کاملA Domain-Theoretic Model Of Nominally-Typed Object-Oriented Programming
The majority of contemporary mainstream object-oriented (OO) software is written using nominally-typed OO programming languages. Extant domain-theoretic models of OOP developed to analyze OO type systems miss crucial features of these mainstream OO languages, such as nominality. This paper summarizes the construction of NOOP as a domain-theoretic model of OOP that includes nominal information f...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2016